﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace Catering_Rules
{
    public partial class LaborCosts
    {
        private readonly Catering_Operation.LaborCosts dal = new Catering_Operation.LaborCosts();
        public LaborCosts() { }

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int id)
        {
            return dal.Exists(id);
        }

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int groupid, int classid, DateTime date)
        {
            return dal.Exists(groupid, classid, date);
        }

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Catering_Model.LaborCostsInfo model)
        {
            return dal.Add(model);
        }
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Catering_Model.LaborCostsInfo model)
        {
            return dal.Update(model);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool UpdateByWhere(Catering_Model.LaborCostsInfo model)
        {
            return dal.UpdateByWhere(model);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int id)
        {
            return dal.Delete(id);
        }
        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool DeleteList(string idlist)
        {
            return dal.DeleteList(idlist);
        }


        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Catering_Model.LaborCostsInfo GetModel(int id)
        {
            return dal.GetModel(id);
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        /// <param name="groupid"></param>
        /// <param name="classid"></param>
        /// <param name="date"></param>
        /// <returns></returns>
        public Catering_Model.LaborCostsInfo GetModel(int groupid, int classid, DateTime date)
        {
            return dal.GetModel(groupid, classid, date);
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            return dal.GetList(strWhere);
        }

        /// <summary>
        /// 获得前几行数据
        /// </summary>
        public DataSet GetList(int Top, string strWhere, string filedOrder)
        {
            return dal.GetList(Top, strWhere, filedOrder);
        }
    }
}
